package com.zmj.sy.mom.srv.aps.utils;

import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.helpers.MessageFormatter;

@Slf4j
@NoArgsConstructor(access = lombok.AccessLevel.PRIVATE)
public class SyExceptionUtils {

    public static SyException e(String message){
        return new SyException(message);
    }

    public static SyException e(String message, Object... args){
        return new SyException(MessageFormatter.arrayFormat(message, args).getMessage());
    }

    public static SyException e(Exception e) {
        return new SyException(e.getMessage(), e);
    }
}
